package com.onlyxiahui.common.action.description.bean;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * 
 * <br>
 * Date 2019-11-04 17:26:41<br>
 * 
 * @author XiaHui [onlovexiahui@qq.com]<br>
 * @since 1.0.0
 */

public class ModuleData {

    private String key;
    private String superKey;
    private List<String> paths;
    private String title;
    private String description;
    private boolean ignore = false;
    private Map<Object, Object> extend;

    private List<MethodData> methods;

    public ModuleData() {
        paths = new ArrayList<>();
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getSuperKey() {
        return superKey;
    }

    public void setSuperKey(String superKey) {
        this.superKey = superKey;
    }

    public List<String> getPaths() {
        return paths;
    }

    public void setPaths(List<String> paths) {
        this.paths = paths;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public boolean isIgnore() {
        return ignore;
    }

    public void setIgnore(boolean ignore) {
        this.ignore = ignore;
    }

    public Map<Object, Object> getExtend() {
        return extend;
    }

    public void setExtend(Map<Object, Object> extend) {
        this.extend = extend;
    }

    public List<MethodData> getMethods() {
        return methods;
    }

    public void setMethods(List<MethodData> methods) {
        this.methods = methods;
    }

    public void addPath(String path) {
        if (null == paths) {
            paths = new ArrayList<>();
        }
        paths.add(path);
    }
}
